$(function () {

    $(".login_form").on("submit", function (e) {
        e.preventDefault();
        $.ajax({
            url: 'http://localhost:8080/api/v1/admin/user/login',
            type: 'post',
            data: $(this).serialize(),
            success: (res) => {
                console.log(res);
                localStorage.setItem("token", res.token)
                location.href = '/index.html'
            }
        })
    })

})